<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of model_admin
 *
 * @author Admin
 */
class Model_user extends MY_Model {
    var $table = 'user';
	
	public function update_weeklikes()
	{
		$this->db->query('UPDATE `user` SET `week` = `likes` - `likes_lastweek`,`likes_lastweek`=`likes`');
	}
	public function update_monthlikes()
	{
		$this->db->query('UPDATE `user` SET `month` = `likes` - `likes_lastmonth`,`likes_lastmonth`=`likes`');
	}
}

?>
